import http from '../../assets/utils/request'
export default {
  namespaced: true,
  state: {
    info: {}
  },
  mutations: {
    getInfo (state, data) {
      state.info = data
    }
  },
  actions: {
    getInfo (ctx) {
      http.get('user/info').then(res => {
        ctx.commit('getInfo', res.result[0])
      })
    }
  }
}
